package third;

import java.util.Scanner;

public class third_9 {
    public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		String a = input.nextLine();
		int[] arr = new int[9];
		int sum=0;
		for(int i=0;i<9;i++) {
			String t = String.valueOf(a.charAt(i));
			arr[i]=Integer.parseInt(t);
			sum+=arr[i]*(i+1);
		}
		sum=sum%11;
		if(sum==10) {
			System.out.println("ISBN-10:"+a+"X");
		}else {
			System.out.println("ISBN-10:"+a+sum);
		}
    }
}
